package com.zhiyin.seal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhiyin.seal.entity.RechargePackageEntity;
import com.zhiyin.seal.entity.RechargeRecordDetailEntity;
import com.zhiyin.seal.entity.RechargeRecordEntity;
import com.zhiyin.seal.entity.RechargeRecordWebEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface CostDao extends BaseMapper {

    List<RechargePackageEntity> selectRechargePackageList();

    List<RechargePackageEntity> selectAllRechargePackageList();

    RechargePackageEntity selectRechargePackage(@Param("packageId") Long packageId);

    Integer insertRechargePackage(@Param("package") RechargePackageEntity rechargePackageEntity);

    Integer updateRechargePackage(@Param("package") RechargePackageEntity rechargePackageEntity);

    RechargeRecordEntity selectRechargeRecordById(@Param("id") Long id);

    List<RechargeRecordWebEntity> selectAllRechargeRecordList();

    List<RechargeRecordEntity> selectRechargeRecordList(@Param("userId") Long userId);

    List<RechargeRecordEntity> selectRechargeRecordListByCompanyId(@Param("companyId") Long companyId);

    List<RechargeRecordDetailEntity> selectRechargeRecordDetailList(@Param("recordId") Long recordId);

    Integer insertRechargeRecord(@Param("rechargeRecordEntity") RechargeRecordEntity rechargeRecordEntity);

    RechargeRecordEntity selectRechargeRecord(@Param("orderNumber") String orderNumber);

    Integer updateRechargeOrderStatus(@Param("orderNumber") String orderNumber,@Param("paymentStatus") Integer paymentStatus);

    Integer insertRechargeRecordDetail(@Param("list")List<RechargeRecordDetailEntity> rechargeRecordDetailEntityList);

    Integer updateSealServiceTime(@Param("list")List<RechargeRecordDetailEntity> rechargeRecordDetailEntityList);
}
